package com.martin.lib_base.ui.holder

import android.view.View
import com.martin.lib_base.R
import com.martin.lib_base.annotation.ItemData
import com.martin.lib_base.base.BaseViewHolder
import com.martin.lib_base.bean.PreviewBean
import com.martin.lib_base.databinding.ItemPreviewImageBinding
import com.martin.lib_base.interfaces.IItemData

@ItemData(PreviewImageViewHolder.Companion.ItemData::class)
class PreviewImageViewHolder(view: View) :
    BaseViewHolder<PreviewBean, ItemPreviewImageBinding>(view) {

    override fun onBindViewHolder(position: Int, item: Any?) {
        binding.bean = getItemBean(item)
    }

    companion object {
        class ItemData : IItemData {
            var path: String? = null
            override fun getItemLayoutId() = R.layout.item_preview_image
        }
    }

}